;----------------------------------------------------------------
; constants
;----------------------------------------------------------------

MIRRORING = %0001 ;%0000 = horizontal, %0001 = vertical, %1000 = four-screen

;----------------------------------------------------------------
; variables
;----------------------------------------------------------------

	.enum $0000

	;NOTE: declare variables using the DSB and DSW directives, like this:

	;MyVariable0 .dsb 1
	;MyVariable1 .dsb 3

	.ende

	;NOTE: you can also split the variable declarations into individual pages, like this:

	;.enum $0100
	;.ende

	;.enum $0200
	;.ende

;----------------------------------------------------------------
; iNES header
;----------------------------------------------------------------

	.db "NES", $1a ;identification of the iNES header
	.db $08 ;number of 16KB PRG-ROM pages
	.db $00 ;number of 8KB CHR-ROM pages
	.db $20|MIRRORING ;mapper 2 and mirroring
	.dsb 9, $00 ;clear the remaining bytes

;----------------------------------------------------------------
; program bank 0
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 0 go here

	.org $c000

;----------------------------------------------------------------
; program bank 1
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 1 go here

	.org $c000

;----------------------------------------------------------------
; program bank 2
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 2 go here

	.org $c000

;----------------------------------------------------------------
; program bank 3
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 3 go here

	.org $c000

;----------------------------------------------------------------
; program bank 4
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 4 go here

	.org $c000

;----------------------------------------------------------------
; program bank 5
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 5 go here

	.org $c000

;----------------------------------------------------------------
; program bank 6
;----------------------------------------------------------------

	.base $8000

	;NOTE: contents of program bank 6 go here

	.org $c000

;----------------------------------------------------------------
; fixed program bank (7)
;----------------------------------------------------------------

	.base $c000

Reset:

	;NOTE: initialization code goes here

NMI:

	;NOTE: NMI code goes here

IRQ:

	;NOTE: IRQ code goes here

;----------------------------------------------------------------
; interrupt vectors
;----------------------------------------------------------------

	.org $fffa

	.dw NMI
	.dw Reset
	.dw IRQ